# @Time:2023/4/26 14:00
# -*- coding: UTF-8 -*-
"""商品模块的序列化器"""
from .models import Goods, GoodsGroup, Detail, Collect, GoodsBanner
from rest_framework import serializers

class GoodsSerializer(serializers.ModelSerializer):
    class Meta:
        model=Goods
        fields="__all__"

class GoodsGroupSerializer(serializers.ModelSerializer):
    class Meta:
        model=GoodsGroup
        fields="__all__"

class DetailSerializer(serializers.ModelSerializer):
    class Meta:
        model=Detail
        fields=['producer','norms','details']

class CollectSerializer(serializers.ModelSerializer):
    class Meta:
        model=Collect
        fields="__all__"

class GoodsBannerSerializer(serializers.ModelSerializer):
    class Meta:
        model = GoodsBanner
        fields = "__all__"

